package com.pan.graph.xy;

import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Supplier;

public class CircleXY extends graphXY{

    private AtomicInteger circleX;
    private AtomicInteger circleY;

    public CircleXY() {
        super();
        circleX = new AtomicInteger(super.x.get() + 400);
        circleY = new AtomicInteger(super.y.get() + 100);
    }

    public CircleXY(Supplier<Integer[]> parentXY) {
        super(parentXY);
        circleX = new AtomicInteger(super.x.get() + 400);
        circleY = new AtomicInteger(super.y.get() + 100);
    }


    public Integer[] getNextXY(){
        return new Integer[]{circleX.get(),circleY.getAndAdd(100)};
    }


}
